package mud.events;

import mud.Combatable;

/** Contains the details of an attack action */
public class AttackEvent extends EntityEvent {

    /** the target of the action */
    private final Combatable target;
    
    /** the amount of damage done */
    private final long damage;
    
	/**
	 * Constructor
     * @param source the combatant performing the action
     * @param target the target of the action
	 * @param damage the amount of damage done
	 */
	public AttackEvent(Combatable source, Combatable target, long damage) {
        super(source);
        this.target = target;
        this.damage = damage;
    }

    /**
     * @return the target of the action
     */
    public Combatable getTarget() {
        return target;
    }

    /**
     * @return the amount of damage done
     */
    public long getDamage() {
        return damage;
    }
}
